package cn.com.mayue.guava;

import com.google.common.base.MoreObjects;

/**
 * Created by mayue on 2016/12/22.
 */
public class Person {
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Person(String name,int age) {
        this.age = age;
        this.name = name;
    }

    public Person() {
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this.getClass().getName())
                .addValue(this.getName()).addValue(this.getAge()).toString();
    }

    public void save(String name,int age){
        this.name = name;
        this.age = age;
    }
}
